import Vue from 'vue';
import App from './App.vue';
import VueRouter from 'vue-router';
import iView from 'iview';
import 'iview/dist/styles/iview.css';
import VCharts from 'v-charts';

Vue.config.productionTip = false;
Vue.use(VueRouter);
Vue.use(iView);
Vue.use(VCharts);

import login from './components/Login.vue';
import superAdmin from './components/SuperAdmin.vue';
import commonAdmin from './components/CommonAdmin.vue';
import driverRegister from './components/driver/DriverRegister.vue'
import sellerRegister from './components/seller/SellerRegister.vue'
import sellerClose from './components/seller/SellerClose.vue'
import sellerNoShop from './components/seller/SellerNoShop.vue'
import sellerError from './components/seller/SellerError.vue'
import driverSearch from './components/driver/DriverSearch.vue'
import driverBlackList from './components/driver/DriverBlackList.vue'
import driverAttestation from './components/driver/DriverAttestation.vue'
import driverIdea from './components/driver/DriverIdea.vue'
import normal from './components/driver/Normal.vue'
import callPhoneDay from './components/business/CallPhoneDay.vue'
import activeDay from './components/business/ActiveDay.vue'
import activeThen from './components/business/ActiveThen.vue'
import updateUserInfo from './components/UpdateUserInfo.vue'
import recruit from './components/valueadd/Recruit.vue'
import forJob from './components/valueadd/ForJob.vue'
import secondCar from './components/valueadd/SecondCar.vue'
import driverLevel from './components/driver/DriverLevel.vue'
import driverDetailList from './components/driver/DriverDetailList.vue'
import driverWithdraw from './components/driver/DriverWithdraw.vue'
import dayRegister from './components/business/DayRegister.vue'
import dayRegisterInvite from './components/business/DayRegisterInvite.vue'
import addressRegisterList from './components/business/AddressRegisterList.vue'
import dayRegisterChange from './components/business/DayRegisterChange.vue'
import levelRegister from './components/business/LevelRegister.vue'
import userRegisterAnalyse from './components/business/UserRegisterAnalyse.vue'
import inviteRegisterList from './components/business/InviteRegisterList.vue'
import dayInviteRegister from './components/business/DayInviteRegister.vue'
import callPhoneNumber from './components/business/CallPhoneNumber.vue'
import advertClickList from './components/business/AdvertClickList.vue'
import advertClickAnalyst from './components/business/AdvertClickAnalyst.vue'
import driverSign from './components/driver/DriverSign.vue'
import driverCarAttestation from './components/driver/DriverCarAttestation.vue'
import referrerManager from './components/market/ReferrerManager.vue'
import loginRecord from './components/system/LoginRecord.vue'
import userManager from './components/system/UserManager.vue'
import msgManager from './components/system/MsgManager.vue'
import msgCommonManager from './components/system/MsgCommonManager.vue'
import videoWeiXinRecord from './components/business/VideoWeiXinRecord.vue'
import videoPhoneRecord from './components/business/VideoPhoneRecord.vue'
import phoneAnalyse from './components/business/PhoneAnalyse.vue'
import weiXinAnalyse from './components/business/WeiXinAnalyse.vue'


var router = new VueRouter({
    routes: [
        {path: '*', component: login},
        {path: '/login', component: login},
        {
            path: '/superAdmin', component: superAdmin, redirect: "/superAdmin/normal", children: [
                {path: "driverRegister", component: driverRegister},
                {path: "referrerManager", component: referrerManager},
                {path: "userManager", component: userManager},
                {path: "driverAttestation", component: driverAttestation},
                {path: "driverSearch", component: driverSearch},
                {path: "driverBlackList", component: driverBlackList},
                {path: "sellerRegister", component: sellerRegister},
                {path: "driverIdea", component: driverIdea},
                {path: "driverLevel", component: driverLevel},
                {path: "driverDetailList", component: driverDetailList},
                {path: "driverWithdraw", component: driverWithdraw},
                {path: "driverSign", component: driverSign},
                {path: "dayRegister", component: dayRegister},
                {path: "dayRegisterInvite", component: dayRegisterInvite},
                {path: "driverCarAttestation", component: driverCarAttestation},
                {path: "addressRegisterList", component: addressRegisterList},
                {path: "dayRegisterChange", component: dayRegisterChange},
                {path: "levelRegister", component: levelRegister},
                {path: "userRegisterAnalyse", component: userRegisterAnalyse},
                {path: "inviteRegisterList", component: inviteRegisterList},
                {path: "dayInviteRegister", component: dayInviteRegister},
                {path: "callPhoneNumber", component: callPhoneNumber},
                {path: "advertClickList", component: advertClickList},
                {path: "advertClickAnalyst", component: advertClickAnalyst},
                {path: "normal", component: normal},
                {path: "callPhoneDay", component: callPhoneDay},
                {path: "forJob", component: forJob},
                {path: "recruit", component: recruit},
                {path: "secondCar", component: secondCar},
                {path: "sellerClose", component: sellerClose},
                {path: "sellerNoShop", component: sellerNoShop},
                {path: "sellerError", component: sellerError},
                {path: "activeDay", component: activeDay},
                {path: "loginRecord", component: loginRecord},
                {path: "msgManager", component: msgManager},
                {path: "videoWeiXinRecord", component: videoWeiXinRecord},
                {path: "videoPhoneRecord", component: videoPhoneRecord},
                {path: "phoneAnalyse", component: phoneAnalyse},
                {path: "weiXinAnalyse", component: weiXinAnalyse},
                {path: "activeThen", component: activeThen}
            ]
        }, {
            path: '/commonAdmin', component: commonAdmin, redirect: "/commonAdmin/msgCommonManager", children: [
                {path: "dayRegister", component: dayRegister},
                {path: "dayRegisterInvite", component: dayRegisterInvite},
                {path: "addressRegisterList", component: addressRegisterList},
                {path: "dayRegisterChange", component: dayRegisterChange},
                {path: "levelRegister", component: levelRegister},
                {path: "userRegisterAnalyse", component: userRegisterAnalyse},
                {path: "inviteRegisterList", component: inviteRegisterList},
                {path: "dayInviteRegister", component: dayInviteRegister},
                {path: "callPhoneNumber", component: callPhoneNumber},
                {path: "advertClickList", component: advertClickList},
                {path: "advertClickAnalyst", component: advertClickAnalyst},
                {path: "callPhoneDay", component: callPhoneDay},
                {path: "loginRecord", component: loginRecord},
                {path: "msgCommonManager", component: msgCommonManager},
                {path: "videoWeiXinRecord", component: videoWeiXinRecord},
                {path: "videoPhoneRecord", component: videoPhoneRecord},
                {path: "phoneAnalyse", component: phoneAnalyse},
                {path: "weiXinAnalyse", component: weiXinAnalyse},
                {path: "activeThen", component: activeThen}
            ]
        }
        ,
        {path: '/updateUserInfo', component: updateUserInfo}
    ]
});

new Vue({
    router,
    render: h => h(App)

}).$mount('#app');

